home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / appshell / appprint.frm < prev    next >
Text File  |  1995-09-06  |  3KB  |  108 lines

  1. VERSION 2.00
  2. Begin Form AppPrint 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Print"
  5.    ClientHeight    =   2190
  6.    ClientLeft      =   2445
  7.    ClientTop       =   3060
  8.    ClientWidth     =   3720
  9.    Height          =   2595
  10.    Left            =   2385
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form2"
  13.    ScaleHeight     =   2190
  14.    ScaleWidth      =   3720
  15.    Top             =   2715
  16.    Width           =   3840
  17.    Begin CommandButton CancelCmd 
  18.       Cancel          =   -1  'True
  19.       Caption         =   "Cancel"
  20.       Height          =   315
  21.       Left            =   2520
  22.       TabIndex        =   4
  23.       Top             =   960
  24.       Width           =   1035
  25.    End
  26.    Begin CommandButton OKCmd 
  27.       Caption         =   "OK"
  28.       Default         =   -1  'True
  29.       Height          =   315
  30.       Left            =   2520
  31.       TabIndex        =   3
  32.       Top             =   540
  33.       Width           =   1035
  34.    End
  35.    Begin TextBox Copies 
  36.       Height          =   315
  37.       Left            =   1020
  38.       TabIndex        =   5
  39.       Text            =   "1"
  40.       Top             =   540
  41.       Width           =   855
  42.    End
  43.    Begin PictureBox Picture1 
  44.       BackColor       =   &H00000000&
  45.       Height          =   45
  46.       Left            =   0
  47.       ScaleHeight     =   15
  48.       ScaleWidth      =   4065
  49.       TabIndex        =   1
  50.       Top             =   300
  51.       Width           =   4095
  52.    End
  53.    Begin Label CopiesLbl 
  54.       Caption         =   "&Copies:"
  55.       Height          =   195
  56.       Left            =   180
  57.       TabIndex        =   2
  58.       Top             =   600
  59.       Width           =   735
  60.    End
  61.    Begin Label PrintingToLbl 
  62.       Height          =   195
  63.       Left            =   60
  64.       TabIndex        =   0
  65.       Top             =   60
  66.       Width           =   3615
  67.    End
  68. End
  69. Sub CancelCmd_Click ()
  70.   
  71.   Unload AppPrint
  72.  
  73. End Sub
  74.  
  75. Sub Form_Load ()
  76.   
  77.   Remove_Items_From_SysMenu AppPrint
  78.   Place_DialogBox_in_Form AppPrint, AppMain
  79.   '
  80.   ' determine printer to print to
  81.   '
  82.   If App_PrinterName = "" Then
  83.     '
  84.     ' get the Windows default printer
  85.     '
  86.     GetDefaultPrinter App_PrinterName, App_PrinterDriver, App_PrinterPort
  87.   End If
  88.  
  89.   PrintingToLbl.Caption = App_PrinterName + " on " + App_PrinterPort
  90.  
  91. End Sub
  92.  
  93. Sub OKCmd_Click ()
  94.  
  95.   '
  96.   ' validate the printing parameters
  97.   '
  98.   If Val(Copies.Text) < 1 Or Val(Copies.Text) > 32000 Then
  99.     MsgBox "Copies must be between 1 and 32000", MB_ICONEXCLAMATION, APP_NAME
  100.     Exit Sub
  101.   End If
  102.  
  103.   App_PrintCopies = Val(Copies.Text)
  104.   Unload AppPrint
  105.  
  106. End Sub
  107.  
  108.